<template>
	<view class="main">
		<view class="top">
			<view class="carPic">
				<image src="../../static/my/car.png" mode="widthFix"></image>
				<view class="content">
					<view class="tip">
						<image src="../../static/my/ok.png" mode="widthFix"></image>
						<text>购买成功！</text>
					</view>
					<view class="operate">
						<view class="useNow" @click="useNow">立即使用</view>
						<view class="backHome" @click="toHome">回到首页</view>
					</view>
				</view>
			</view>
			<view class="topCon">
				
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				item_id:''
			}
		},
		onLoad(option) {
			this.item_id = option.id
		},
		onShow() {
			
		},
		methods: {
			useNow() {
				uni.navigateTo({
					url:'/pages/suitableShop?id='+this.item_id
				})
			},
			toHome() {
				uni.switchTab({
					url:'/pages/my/my'
				})
			}
		}
	}
</script>

<style>
	.top {
		width: 750rpx;
		height: 308rpx;
		background: url(../../static/my/sbg.png) no-repeat;
		background-size: 100% 100%;
		position: relative;
	}
	.topCon {
		width: 702rpx;
		height: 845rpx;
		position: absolute;
		top: 108rpx;
		left: 50%;
		margin-left: -351rpx;
		background: #fff;
		border-radius: 10rpx;
	}
	.carPic {
		width: 702rpx;
		position: absolute;
		left: 50%;
		top: 32rpx;
		margin-left: -351rpx;
		text-align: center;
		z-index: 1;
	}
	.carPic>image {
		width: 352rpx;
		height: 252rpx;
	}
	.tip {
		margin-top: 40rpx;
	}
	.tip image {
		width: 44rpx;
		height: 44rpx;
		vertical-align: sub;
		margin-right: 39rpx;
	}
	.tip text {
		font-size: 42rpx;
		color: #1596f2;
		font-family: '苹方';
		font-weight: 600;
		letter-spacing: 2rpx;
	}
	.useNow {
		width: 566rpx;
		height: 100rpx;
		line-height: 100rpx;
		background: linear-gradient(to right,#64cdff,#58aaff,#4c87ff);
		color: #fff;
		font-size: 36rpx;
		text-align: center;
		border-radius: 50rpx;
		margin: 80rpx auto 38rpx;
		font-family: '苹方';
		letter-spacing: 2rpx;
	}
	.backHome {
		width: 566rpx;
		height: 100rpx;
		line-height: 100rpx;
		background: #fff;
		color: #1596f2;
		font-size: 36rpx;
		text-align: center;
		border-radius: 50rpx;
		margin: 0 auto;
		border: 1rpx solid #1596f2;
		font-weight: bold;
		letter-spacing: 2rpx;
	}
</style>
